<template>
	<view class="statement">
		<view class="repair_main" v-for="(item,index) in arrList" :key="item.name">
			<view class="title" v-if="item.title!=''">
				<view class="repair-left" />
				<text>{{item.title}}</text>
			</view>
			<view class="card-detail">
				<view class="ful-detail">
					<view class="detail-left">{{item.name}}</view>
					<view class="detail-right" v-if="item.form_type == 'text'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<u--textarea border="none" v-model="item.value" auto-height height="40" :disabled="isPdf"
						placeholder=" " autoHeight placeholder-style="font-size: 28rpx;color: #999999;backgroundColor:#999999;" />
					</view>
					<view class="border_" v-if="isPdf" />
					<view class="detail-right" v-if="item.form_type == 'select'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view style="flex: 1;">
							<radio-group @change="(e)=>changeR(e,index)">
								<label style="margin-right: 20px;" v-for="(i,ind) in item.setting">
									<radio :value="i" :checked="item.value==(ind+1)" :disabled="isPdf">{{i}}</radio>
								</label>
							</radio-group>
						</view>
					</view>
					<view class="border_" v-if="isPdf" />
					<view class="detail-right" v-if="item.form_type == 'select2'"
						:style="{backgroundColor:isPdf?'#fff':'#F5F6F8'}">
						<view class="dis f_13" v-for="(i,ind) in item.setting" :key="ind">
							<view class="">{{i.set_name}}</view>
							<view class="">
								<view style="flex: 1;">
									<radio-group>
										<label style="margin-right: 20px;" v-for="(j,jin) in i.value" :key="jin">
											<radio :value="j">{{j}}</radio>
										</label>
									</radio-group>
								</view>
							</view>
						</view>
					</view>
					<view class="border_" v-if="isPdf" />
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			arrList: {
				type: Array,
				default: [{
						form_type: "text",
						title: "系统状态检查",
						name: "客户对设备运行的描述",
						setting: [],
						value: ""
					},
					{
						form_type: "text",
						title: "",
						name: "检查故障信息, 故障代码摘录",
						setting: [],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "图像质量检查",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "系统预评价",
						setting: ["✔", "/"],
						value: ""
					},
					
					{
						form_type: "select",
						title: "预防性保养",
						name: "清洁病床",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "清洁磁体前后盖、滑道等",
						setting: ["✔", "/"],
						value: ""
					},
					
					{
						form_type: "select",
						title: "目测检查线圈和附件",
						name: "体部M线圈 Body Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "PA M线圈  PA Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "头部M线圈 Head Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "颈部M线圈 Neck Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "腰椎M线圈 Spine Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "大柔性线圈 Cp Flex coil large",
						setting: ["✔", "/"],
						value: ""
					},{
						form_type: "select",
						title: "",
						name: "小柔性线圈 Cp Flex coil small",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "胸部线圈 Breast matrix coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "膝关节线圈 Extremity Matrix MR Coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "4通道特殊线圈 4channelspecial purpose coil",
						setting: ["✔", "/"],
						value: ""
					},{
						form_type: "select",
						title: "",
						name: "肩部线圈 Focus Shoulder Array coil",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "小肩部线圈 Focus Shoulder Array coil Small",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "8通道腕关节线圈 8 Channel wrist coil",
						setting: ["✔", "/"],
						value: ""
					},
					
					{
						form_type: "select",
						title: "",
						name: "8通道踝关节线圈 8 Channel foot ankle coil",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "text",
						title: "",
						name: "其它线圈或附件（名称，备件号，目测结果）",
						setting: [],
						value: ""
					},
					{
						form_type: "select",
						title: "系统检查",
						name: "检查模型有无损坏",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "检查模型内有无气泡",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "检查磁屏蔽层温度",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "检查磁体阀门压力值",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "检查磁体系统是否有泄漏",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "SEP： 检查系统水压",
						setting: ["✔", "/"],
						value: ""
					},{
						form_type: "select",
						title: "",
						name: "磁体：检查氦压缩机压力",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "射频室：检查接触表面",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "射频室：检查门轴、门锁",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "检查计算机鼠标",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "软件保养",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "连接工作站，确认工作站通畅",
						setting: ["✔", "/"],
						value: ""
					},
					
					{
						form_type: "select",
						title: "图像质量保证",
						name: "图像质量保证测试",
						setting: ["✔", "/"],
						value: ""
					}, {
						form_type: "select",
						title: "",
						name: "线圈质量保证测试 QA",
						setting: ["✔", "/"],
						value: ""
					},
					{
						form_type: "select",
						title: "",
						name: "保存数据备份",
						setting: ["✔", "/"],
						value: ""
					},
					
					{
						form_type: "text",
						title: "保养工作结论",
						name: "保养后设备状态",
						setting: [],
						value: ""
					},
					{
						form_type: "text",
						title: "",
						name: "保养中发现的问题和处理意见及措施",
						setting: [],
						value: ""
					}
				]
			},
			isPdf: {
				type: Boolean,
				default: false
			},
		},
		data() {
			return {

			}
		},
		methods: {
			changeR(e, index) {
				console.log(this.arrList,'this.arrList-----')
				this.arrList[index].value = e.detail.value == '✔' ? 0 : 1
			},
			getArr() {
				this.$emit('geArr', this.arrList)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.repair_main {
		margin: 20rpx 0;
		background-color: #fff;
		border-radius: 20rpx;
		overflow: hidden;
	}

	.repair-left {
		width: 10rpx;
		height: 32rpx;
		margin-right: 10rpx;
		background-color: #1A66FF;
	}

	.title {
		padding: 16rpx 12rpx;
		background-color: #fff;
		font-size: 31rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 600;
		color: #434343;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.border_ {
		height: 2rpx;
		background-color: #EBEEF1;
	}

	.dis {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.f_13 {
		font-size: 26rpx;
		margin-bottom: 16rpx;
	}

	.card-detail {
		background-color: #FFFFFF;

		.ful-detail {
			margin: 0 10rpx;
			padding: 20rpx 10rpx 6rpx;

			.detail-left {
				font-size: 28rpx;
				font-weight: 500;
				margin-bottom: 14rpx;
				color: #3B3D3D;
				line-height: 33rpx;
			}

			.detail-right {
				font-size: 28rpx;
				font-weight: 500;
				color: #000;
				padding: 14rpx 20rpx;
				line-height: 50rpx;
			}
		}
	}

	/* 设置input框提示内容的样式 */
	input::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	input::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	input:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	input:-ms-input-placeholder {
		color: #434343;
	}

	/* 设置textarea框提示内容的样式 */
	textarea::-webkit-input-placeholder {
		color: #434343;
	}

	/*webkit 内核浏览器*/
	textarea::-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 19+*/
	textarea:-moz-placeholder {
		color: #434343;
	}

	/*Mozilla Firefox 4 to 18*/
	textarea:-ms-input-placeholder {
		color: #434343;
	}

	/deep/ .xp-picker-mask {
		z-index: 222;
	}
</style>